<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/

/**
 * Description of User
 *
 * @author dejo
 */
class Admin_Form_Klant extends ZendX_JQuery_Form {

    public function __construct() {

        parent::__construct($options);

        $this->setName('klant');
        $this->setMethod('post');
        $this->setAttrib('enctype', 'multipart/form-data');
        $this->setAttrib('class', 'contact-form');

        $element = new Zend_Form_Element_Text('klant');
        $element->setRequired(true)
                ->addValidators(array(
                array('StringLength', false, array(1, 150)),
                ))
                ->addFilters(array('StripTags', 'StringTrim'))
                ->setLabel('Naam');
        $this->addElement($element);

        $startDatum = new ZendX_JQuery_Form_Element_DatePicker('datum');
        $startDatum->setLabel('Oplever datum')
                ->addValidator('Date')
                ->setRequired(true);
        $this->addElement($startDatum);

        $element = new Zend_Form_Element_Text('url');
        $element->setRequired(true)
                ->addValidators(array(
                array('StringLength', false, array(1, 150)),
                    array('Hostname'),
                ))
                ->addFilters(array('StripTags', 'StringTrim'))
                ->setDescription('zonder http:// toevoeging')
                ->setLabel('Url');
        $this->addElement($element);

        $element = new Zend_Form_Element_File('plaatje');
        $element->setRequired(false)
                ->addValidators(array(
                array('StringLength', false, array(1, 150)),
                array('Extension', false, 'jpg,png,gif'),
                ))
                ->addFilters(array('StripTags', 'StringTrim'))
                ->setLabel('Plaatje');
        $this->addElement($element);

        $submit = new Zend_Form_Element_Submit('Save');
        $submit->setLabel('Sla op');

        $this->addElement($submit);

    }
}
?>
